# -*- coding: utf-8 -*-
# @Time    : 2024/2/23  10:35
# @Author  : zhanghao
# @FileName: worldPeace.py
# @Software: PyCharm
"""
    Description:
        
"""
import threading

from login import Login
from power import Power
from apscheduler.schedulers.background import BackgroundScheduler


if __name__ == '__main__':
    # 设置开机自启动
    power = Power()

    if power.check():
        power.selfStart()

        login = Login()

        scheduler = BackgroundScheduler()
        scheduler.add_job(login.processSign, trigger='cron', day_of_week='mon-fri', hour=8, minute=10)
        scheduler.add_job(login.processSignOut, trigger='cron', day_of_week='mon-fri', hour=17, minute=3)
        scheduler.start()

        event = threading.Event()
        event.wait()

